<?php

App::uses('Controller', 'Controller');

/**
 * Application Controller
 *
 * Add your application-wide methods in the class below, your controllers
 * will inherit them.
 *
 * @package		app.Controller
 * @link		http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
 */
class AppController extends Controller {
	
	protected $appSettings;
	
	public function beforeFilter() {
		parent::beforeFilter();
		Configure::load('settings');
		$this->appSettings = Configure::read('settings');
		$this->set('appSettings', $this->appSettings);
		Configure::write('Config.language', $this->appSettings['App']['language']);
	}
	
}
